import request from "../utils/request.js";

export function getOrdersList(current, size, number, status, phone, consignee) {
  return request({
    url: "/orders/getOrdersList",
    method: "get",
    params: {
      current,
      size,
      number,
      status,
      phone,
      consignee,
    },
  });
}

export function deleteOrders(id) {
  return request({
    url: "/orders/deleteOrders",
    method: "post",
    params: {
      id,
    },
  });
}

export function selectOrdersById(id) {
  return request({
    url: "/orders/selectOrdersById",
    method: "get",
    params: {
      id,
    },
  });
}

export function getSelectById(id) {
  return request({
    url: "/orders/getSelectById",
    method: "get",
    params: {
      id,
    },
  });
}
export function getSelectId(id) {
  return request({
    url: "/orders/getSelectId",
    method: "get",
    params: {
      id,
    },
  });
}

export function uodateOrders(orders) {
  return request({
    url: "/orders/uodateOrders",
    method: "post",
    data: orders,
  });
}
export function updateAddress(orders) {
  return request({
    url: "/orders/updateAddress",
    method: "post",
    data: orders,
  });
}
export function updateStatus(id) {
  return request({
    url: "/orders/updateStatus",
    method: "post",
    params: {
      id,
    },
  });
}

export function deletebyidlist(idlist) {
  return request({
    url: "/order/deletebyidlist",
    method: "post",
    data: idlist,
  });
}
